/* ========================================================================= */
/* ------------------------------------------------------------------------- */
/*!
  \file			data_types.h
  \date			September 2013
  \author		TNick
    
*//*


 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Please read COPYING and README files in root folder
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
#ifndef LIBALC_data_types_h_INCLUDE
#define LIBALC_data_types_h_INCLUDE
//
//
//
//
/*  INCLUDES    ------------------------------------------------------------ */

#include <libalc/libalc_config.h>
#ifdef __cplusplus
extern "C" {
#endif

/*  INCLUDES    ============================================================ */
//
//
//
//
/*  DEFINITIONS    --------------------------------------------------------- */

#define ALC8U           unsigned char
#define ALC8S           signed char

#if TYPE_SHORT == 2
#   define ALC16U          unsigned short
#   define ALC16S          signed short
#elif TYPE_INT == 2
#   define ALC16U          unsigned int
#   define ALC16S          signed int
#else
#   error "Can't determine the type for 16 bits"
#endif

#if TYPE_INT == 4
#   define ALC32U          unsigned int
#   define ALC32S          signed int
#elif TYPE_LONG == 4
#   define ALC32U          unsigned long
#   define ALC32S          signed long
#elif TYPE_LONG_LONG == 4
#   define ALC32U          unsigned long long
#   define ALC32S          signed long long
#else
#   error "Can't determine the type for 32 bits"
#endif

#if TYPE_INT == 8
#   define ALC64U          unsigned int
#   define ALC64S          signed int
#elif TYPE_LONG == 8
#   define ALC64U          unsigned long
#   define ALC64S          signed long
#elif TYPE_LONG_LONG == 8
#   define ALC64U          unsigned long long
#   define ALC64S          signed long long
#else
#   error "Can't determine the type for 64 bits"
#endif

//! the size of a file is represented in this type
typedef ALC64U      file_size_t;

//! the offset in a file
typedef ALC64S      file_offset_t;

//! largest string representing an integer
#define INT32_EXPANDED_SZ   16

//! largest string representing an integer
#define INT64_EXPANDED_SZ   32

/*  DEFINITIONS    ========================================================= */
//
//
//
//
/*  DATA    ---------------------------------------------------------------- */

/*  DATA    ================================================================ */
//
//
//
//
/*  FUNCTIONS    ----------------------------------------------------------- */


/*  FUNCTIONS    =========================================================== */
//
//
//
//
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
#ifdef __cplusplus
}
#endif
#endif // LIBALC_data_types_h_INCLUDE
